-- GENERATED SPELL FOR [Scarlet Monk] --


function spell0_4540(pUnit, Event) --@Kick,n/a--
pUnit:FullCastSpellOnTarget(11978,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_4540', 6275, 1)
end

function spell1_4540(pUnit, Event) --@Thrash,Self--
pUnit:FullCastSpellOnTarget(3391,pUnit)
pUnit:RegisterEvent('Sorts_4540', 646, 1)
end

function Sorts_4540(pUnit, Event)
local choix_sorts_4540 = math.random(0, 1)
if choix_sorts_4540 == 0 then
pUnit:RegisterEvent('spell0_4540', 1, 1)
end
if choix_sorts_4540 == 1 then
pUnit:RegisterEvent('spell1_4540', 1, 1)
end
end

function mob4540_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_4540', math.random(1500, 3000), 1)
end

function mob4540_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob4540_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob4540_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(4540, 1, 'mob4540_Action')
RegisterUnitEvent(4540, 2, 'mob4540_Leave')
RegisterUnitEvent(4540, 3, 'mob4540_Kill')
RegisterUnitEvent(4540, 4, 'mob4540_Die')
